<div class="row wrapper white-bg page-heading">
  <div class="container-fluid">
    <h2>用户列表</h2>
  </div>
  <br>
  <div class="container-fluid">
    <table class="table table-hover">
      <thead>
      <tr>
        <th>用户名</th>
        <th>电话</th>
        <th>操作</th>
      </tr>
      </thead>
      <tfoot></tfoot>
      <tbody>
      <tr ng-repeat="item in userListCtrl.userList">
        <td style="max-width:200px;min-width:50px;">{{item.username}}</td>
        <td>{{item.phoneNumber}}</td>
        <td>
          <button class="btn btn-info btn-sm" ui-sref="home.user.userAdd({uid:item.userId})">查看详情</button>
        </td>
      </tr>
      </tbody>
    </table>
  </div>
  <div class="container-fluid">
    <div class="col-md-12">
      <div class="fenyeBox" ng-show="userListCtrl.totalNum != 0">
        <div class="pull-left">
          总条数：
          <strong> {{ userListCtrl.totalNum}} </strong>条，共
          <strong> {{ userListCtrl.pageResult.totalPage}}</strong>
          页，当前第
          <strong>{{ userListCtrl.pageNo}}</strong> 页
        </div>
        <div class="pull-right" ng-show="userListCtrl.pageResult.totalPage > 1">
          <ul class="pagination">
            <li>
              <button class="btn btn-white btn-bitbucket" ng-disabled=" userListCtrl.pageNo==1"
                      ng-click="userListCtrl.changePage(1)">
                首页
              </button>
            </li>
            <li>
              <button class="btn btn-white btn-bitbucket" ng-disabled=" userListCtrl.pageNo==1"
                      ng-click="userListCtrl.changePage(userListCtrl.pageNo-1)">
                上一页
              </button>
            </li>
            <li ng-repeat="page in  userListCtrl.pageResult.pages">
              <button ng-click="userListCtrl.changePage(page)" class="btn btn-white btn-bitbucket"
                      ng-disabled="userListCtrl.pageNo == page">{{page}}
              </button>
            </li>
            <li>
              <button class="btn btn-white btn-bitbucket"
                      ng-disabled="userListCtrl.pageNo== userListCtrl.pageResult.totalPage"
                      ng-click="userListCtrl.changePage(userListCtrl.pageNo+1)">
                下一页
              </button>
            </li>
            <li>
              <button class="btn btn-white btn-bitbucket"
                      ng-disabled="userListCtrl.pageNo== userListCtrl.pageResult.totalPage"
                      ng-click="userListCtrl.changePage(userListCtrl.pageResult.totalPage)">
                尾页
              </button>
            </li>
          </ul>
        </div>
      </div>
      <p class="text-center" ng-hide=" userListCtrl.totalNum != 0">查无结果</p>
    </div>
  </div>
</div>
